enum Sex {
  male,
  female,
}

class RefineUserInfoModel {
  Sex sex;
  String name;
  String avatar;
  DateTime birthDate;

  RefineUserInfoModel({
    required this.sex,
    required this.name,
    required this.avatar,
    required this.birthDate,
  });

  String get _sexString => sex.toString().split('.').last;

  Map<String, dynamic> toMap() {
    return {
      'sex': _sexString,
      'name': name,
      'avatar': avatar,
      'birthDate': birthDate.toIso8601String(),
    };
  }
}
